﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

namespace Coding4Fun.Cannon.TechEdPhone.Complete
{
	public partial class MainPage : PhoneApplicationPage
	{
		public MainPage()
		{
			InitializeComponent();
            navigationControl1.ButtonNavigationChanged += new EventHandler<Controls.ButtonNavigationEventArgs>(navigationControl1_ButtonNavigationChanged);

            
		}

        void navigationControl1_ButtonNavigationChanged(object sender, Controls.ButtonNavigationEventArgs e)
        {


            switch (e.NewButton)
            {
                case Coding4Fun.Cannon.TechEdPhone.Complete.Controls.ButtonNavigation.Status:
                    break;
                case Coding4Fun.Cannon.TechEdPhone.Complete.Controls.ButtonNavigation.Drive:
                    driveView1.Visibility = System.Windows.Visibility.Visible;
                    fireView1.Visibility = System.Windows.Visibility.Collapsed;
                    aimView1.Visibility = System.Windows.Visibility.Collapsed;
                    break;
                case Coding4Fun.Cannon.TechEdPhone.Complete.Controls.ButtonNavigation.Aim:
                    driveView1.Visibility = System.Windows.Visibility.Collapsed;
                    fireView1.Visibility = System.Windows.Visibility.Collapsed;
                    aimView1.Visibility = System.Windows.Visibility.Visible;

                    break;
                case Coding4Fun.Cannon.TechEdPhone.Complete.Controls.ButtonNavigation.Fire:
                    driveView1.Visibility = System.Windows.Visibility.Collapsed;
                    fireView1.Visibility = System.Windows.Visibility.Visible;
                    aimView1.Visibility = System.Windows.Visibility.Collapsed;
                    break;
                case Coding4Fun.Cannon.TechEdPhone.Complete.Controls.ButtonNavigation.None:
                    break;
                default:
                    break;
            }
        }

		private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
		{
			LayoutRoot.Visibility = Visibility.Visible;

		}

        
	}
}